<?php
require_once (__DIR__ . "/../../models/Addresses.php");
require_once (__DIR__ . "/../../models/Users.php");
$row = Addresses::Get($_REQUEST['id']);
$user = Users::Get($row['userId']);
?>

				<dl class="dl-horizontal">
					<dt>Address Type:</dt>
					<dd><?php echo Addresses::GetAddressType($row['addressType']);?></dd>
					<dt>Line 1:</dt>
					<dd><?php echo $row['line_1'];?></dd>
					<dt>Line 2:</dt>
					<dd><?php 
					if ($row['line_2'] == NULL )
						echo 'N/A';
					else	
						echo $row['line_2'];
					?></dd>
					<dt>City:</dt>
					<dd><?php echo $row['city'];?></dd>
					<dt>State:</dt>
					<dd><?php echo $row['state'];?></dd>
					<dt>Zip code:</dt>
					<dd><?php echo $row['zip'];?></dd>
					<dt>User Id:</dt>
					<dd><?php echo $user['firstName'].' '.$user['lastName'];?></dd>
					<dt>Created:</dt>
					<dd><?php echo $row['created_at'];?></dd>
					<dt>Updated:</dt>
					<dd><?php echo $row['updated_at'];?></dd>
				</dl>